package com.ponhu.ea2.dto;

import com.ponhu.ea2.annotations.EnableColumnChangeLog;
import com.ponhu.ea2.annotations.OperationRecordId;
import com.ponhu.ea2.constants.CommonConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@Accessors(chain = true)
@ApiModel(value = "设置货品关联物料 ")
public class InventoryMaterialSetDto extends OperatorDto {

    @NotNull(message = "货品ID不可为空")
    @ApiModelProperty(value = "货品ID")
    @OperationRecordId(businessTable = CommonConstant.BUSINESS_TYPE_INVENTORY)
    private Long inventoryId;

    @NotNull(message = "物料ID不可为空")
    @ApiModelProperty(value = "物料ID")
    private Long materialId;

    @NotEmpty(message = "物料编码不可为空")
    @ApiModelProperty(value = "物料编码")
    @EnableColumnChangeLog(columnDesc = "物料编码")
    private String materialCode;

}
